package activity.view

import android.widget.CheckBox
import mvc.model.Status

class StatusGroup(
    val pickUp: CheckBox,
    val pickDown: CheckBox,
    val pickMotor1Forward: CheckBox,
    val pickMotor1BackUp: CheckBox,
    val pickMotor2Forward: CheckBox,
    val pickMotor2BackUp: CheckBox,
    val leftRightMoveRight: CheckBox,
    val leftRightMoveLeft: CheckBox,
    val doorClose: CheckBox,
    val doorKey1: CheckBox,
    val doorKey2: CheckBox,
    val doorKey3: CheckBox,
    val downKey: CheckBox,
    val upKey: CheckBox,
    val replenishKey: CheckBox,
    val upDownUp: CheckBox,
    val upDownDown: CheckBox,
    val leftRightZero: CheckBox
) {
    fun setStatus(status: Status) {
        pickUp.isChecked = status.pickDoorUp
        pickDown.isChecked = status.pickDoorDown
        pickMotor1Forward.isChecked = status.pick1Forward
        pickMotor1BackUp.isChecked = status.pick1BackUp
        pickMotor2Forward.isChecked = status.pick2Forward
        pickMotor2BackUp.isChecked = status.pick2BackUp
        leftRightMoveRight.isChecked = status.leftRightMoveRight
        leftRightMoveLeft.isChecked = status.leftRightMoveLeft
        doorClose.isChecked = status.doorClose
        doorKey1.isChecked = status.doorKey1
        doorKey2.isChecked = status.doorKey2
        doorKey3.isChecked = status.doorKey3
        downKey.isChecked = status.downKey
        upKey.isChecked = status.upKey
        replenishKey.isChecked = status.replenishKey
        upDownUp.isChecked = status.upDownUp
        upDownDown.isChecked = status.upDownDown
        leftRightZero.isChecked = status.leftRightZero
    }
}